package cqrtplm.mapper;

import com.alibaba.fastjson.JSONObject;
import com.hustcad.plm.pdm.common.model.dto.search.SearchClassificationDTO;
import cqrtplm.dto.ClassInfoDTO;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

import java.math.BigInteger;
import java.util.List;
import java.util.Map;

@Repository
public interface RTTypeClassMapper {
    BigInteger queryTypeOidByName(String name);

    SearchClassificationDTO selectClassificationByName(String name);

    String queryTypeNameByOid(String oid);

    List<String> queryClassIdByName(@Param("typeName") String typeName, @Param("typeName") String categoryCode);

    List<Map<String, String>> selectAllTypeIBAName(@Param("var1") String var1, @Param("var2") String var2);

    JSONObject selectClassNameAndCodeByClassId(@Param("classId") String classId);

    List<ClassInfoDTO> selectClassInfoByClassId(@Param("list") List<BigInteger> list);

    List<ClassInfoDTO> selectClassInfoByClassIdContainsParentAttribute(@Param("list") List<BigInteger> list);

    List<String> selectIbaNameByClassId(@Param("parentOid") String parentOid);

    int checkClassDisplayNameIfExist(@Param("name") String name);

    List<JSONObject> selectAllTypeOidAndDisName();

    List<JSONObject> selectEnumOidByClassOid(@Param("enumOid") String enumOid);

    List<JSONObject> queryStringValueByAttrDefOid(@Param("attrDefMapOid") String attrDefMapOid);

    List<JSONObject> selectPartNumberByIbaAttrOidAndClassOid(@Param("ibaAttrOid") String ibaAttrOid, @Param("classOid") List<String> classOidList);

    List<JSONObject> selectPartNumberByAttributereferenceoidAndClassOid(@Param("attributereferenceoid") String attributereferenceoid, @Param("classOid") List<String> classOidList);

}
